package com.iee.io;

import com.google.common.collect.Maps;
import org.apache.commons.lang3.SerializationUtils;

import java.io.Serializable;
import java.util.Map;

/**
 * 序列化和反序列化功能
 */
public class SerializationUtilss {
    public static void main(String[] args) {
        Map<String, String> map = Maps.newHashMap();
        map.put("a", "1");
        map.put("b", "2");
        map.put("c", "3");
        byte[] serialize = SerializationUtils.serialize((Serializable) map);
        Object deserialize = SerializationUtils.deserialize(serialize);
        System.out.println(deserialize);
    }
}
